<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>class用在组件上</title>
		<script src="https://cdn.jsdelivr.net/npm/vue"></script>
	</head>
	<body>
		<div id="app">
			<todo-item :class="classObject"></todo-item>
		</div>
		<script>
			Vue.component('todo-item',{
				template:'<div class="aa bb"></div>'
			})
			var vm = new Vue({
				el:'#app',
				data:{
					isActive:true
				},
				computed:{
					classObject:function(){
						return{
							active:this.isActivezA
						}
					}
				}
			})
		</script>
	</body>
</html>
